package com.yyg.boot.repository;

import com.yyg.boot.entity.Person;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.List;

/**
 * @Description Description
 * @Author 一一哥Sun
 * @Date Created in 2020/3/27
 */
@RepositoryRestResource(collectionResourceRel = "people",path="people")
public interface PersonRepository extends PagingAndSortingRepository<Person,Long> {

    List<Person> findByLastName(@Param("name") String name);

}
